package day09API.string;

//实现方法,完成获取下列文件名中的后缀名


public class Test01 {
    public static void main(String[] args) {
        String filename1 = "logo.png";
        String filename2 = "jquery.1.1.2.js";
        System.out.println(getExtByName(filename1));
        System.out.println(getExtByName(filename2));
    }
    public static String getExtByName(String name){
        int index = name.lastIndexOf(".")+1;
        return name.substring(index);
    }
}
